package com.mathdroid.model.abilities.specs.sniper;

import com.mathdroid.model.abilities.Ability;
import com.mathdroid.model.enums.EDmgType;

public final class LegShot extends Ability {

	/**
	 * Generated UID.
	 */
	private static final long serialVersionUID = 1277148755643957336L;

	public LegShot() {
		this.setName("Leg Shot");
		this.setIconName("cripplingfire");
		this.setResource("Energy");
		this.setCost(12d);
		this.setCooldownMs(15000d);
		this.setDirectDamageType(EDmgType.ENERGY);
		
		this.setStandardHealthPercentMax(0.1);
		this.setStandardHealthPercentMin(0.08);	
		this.setAmountModifierPercent(-0.43);
		this.setCoefficient(0.86);
		
		this.setTrainableLevel(12);
	}
	
	@Override
	public String getDescription() {
		return "Fires a shot that deals " + this.getMinDirect() + " - " 
			+ this.getMaxDirect() + " weapon damage and " +
			"immobilizes the target for 5 seconds. Damage dealt " +
			"after 2 seconds ends the effect prematurely.";
	}

	@Override
	public double getMinPeriodic() {
		return 0d;
	}

	@Override
	public double getMaxPeriodic() {
		return 0d;
	}

	@Override
	public double getMinDirect() {
		return
			this.getAmountModifierPercent() 
			* this.getCharStats().getRangedDamagePrimaryMin()
		
			+ this.getCoefficient() 
			* this.getCharStats().getTotalBonusDamageTechForce()
		
			+ this.getStandardHealthPercentMin() 
			* this.getStdDmg();
	}

	@Override
	public double getMaxDirect() {
		return
			this.getAmountModifierPercent() 
			* this.getCharStats().getRangedDamagePrimaryMax()
		
			+ this.getCoefficient() 
			* this.getCharStats().getTotalBonusDamageTechForce()
		
			+ this.getStandardHealthPercentMax() 
			* this.getStdDmg();
	}

}
